<#compress>
<!DOCTYPE html>
<html>
	<head>
		<title>用户管理</title>
		<meta name="keywords" content="keyword1,keyword2,keyword3">
		<meta name="description" content="this is my page">
		<meta name="content-type" content="text/html; charset=UTF-8">
		<base href="${webroot}">
		<#include "../../template/easyui.ftl" parse="true" encoding="UTF-8">
		<script type="text/javascript" src="res/rbac/user.js"></script>
		<style type="text/css">
		    .radioSpan {
		      position: relative;
		      border: 1px solid #95B8E7;
		      background-color: #fff;
		      vertical-align: middle;
		      display: inline-block;
		      overflow: hidden;
		      white-space: nowrap;
		      margin: 0;
		      padding: 0;
		      -moz-border-radius: 5px 5px 5px 5px;
		      -webkit-border-radius: 5px 5px 5px 5px;
		      border-radius: 5px 5px 5px 5px;
		      display:block;
		      width:299px;
		    }
		</style>
	</head>
	<body>
		<div class="easyui-layout" data-options="fit:true,border:false" >
			<div data-options="region:'west',split:true,border:false" style="width:20%;">
            	<div class="easyui-panel" style="padding:5px;border: 0px">
					<ul class="easyui-tree" id="usertree" style="padding-top: 10px;"
						data-options="
							lines: true,
							loadFilter:convertTreeAppendRoot, 
							onSelect: module.onSelectTree
					"></ul>
				</div>
            </div>
			<div data-options="region:'center',border:false" >
				<table class="easyui-datagrid" title="" id="usergrid"
				  		 data-options="
				  		 	pageSize:20,
				  		 	striped:true,
				  		 	border:false,
				  		 	url: 'user/userlist.grid',
				  		 	method: 'get',
				  		 	rownumbers: true,
				  		 	pagination: true,
				  		 	fit: true,
				  		 	toolbar: '#tb',
				  		 	onDblClickRow: module.onDblClickRow
				  		 ">
					<thead frozen="true">
						<tr>
							<th data-options="field:'id',width:50,checkbox:true">ID</th>
							<th data-options="field:'u_alias',width:180,formatter:userFormat">用户名</th>
							<th data-options="field:'u_account',width:100">账号</th>
						</tr>
					</thead>
					<thead>
						<tr>
							<th data-options="field:'u_mobile',width:100">手机</th>
							<th data-options="field:'u_mail',width:180">邮箱</th>
							<th data-options="field:'g_name',width:180">所属单位</th>
							<th data-options="field:'r_name',width:150,
								formatter:function(value, row, index) {
									return Common.Util.formatter(value);
								}">所属角色</th>
							<th data-options="field:'u_status',width:50,align:'center',
								formatter:uStatusFormatImg">状态</th>
							<th data-options="field:'u_remarks',width:200,
								formatter:function(value, row, index) {
									return Common.Util.formatter(value);
								}">备注</th>
							<th data-options="field:'u_cdate',width:130">创建时间</th>
						</tr>
					</thead>
				</table>
				<div id="tb" style="padding:5px;height:auto">
					<div style="margin-bottom:5px">
						用户名:
						<input id="username" class="easyui-textbox" data-options="prompt:'输入关键字进行查询'" style="width:140px;">
						<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-search" onclick="module.queryDatagrid();">查询</a>
						<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-reload" onclick="module.refreshDatagrid();">刷新</a>
						<br>
						<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-load" plain="true" onclick="module.expandTree();">展开</a>
						<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-load" plain="true" onclick="module.collapseTree();">收缩</a>
						<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-useradd" onclick="module.openDialog()">新增</a>
						<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-useredit" onclick="module.modify()">修改</a>
						<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-ok" onclick="module.enable()">启用</a>
						<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-cancel" onclick="module.disenable()">禁用</a>
						<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-userdelete" onclick="module.deleted()">删除</a>
						
					</div>
				</div>
			</div>

			<div id="udialog" class="easyui-dialog" title="编辑用户"
				style="width:360px;height:550px;padding-left: 20px;padding-top: 10px;"
				data-options="resizable:true,modal:true,buttons:'#dlg-buttons',closed:true">
				<form name="ufrom" id="ufrom" method="post">
					<div>
						<input type="hidden" name="id" value="">
						<font style="font-size: 12px;">用户名:</font><br />
						<input name="UAlias" id="UAlias" maxlength="30" class="easyui-textbox"
							data-options="required:true" style="width:300px;"><br>
					</div>
					<div>
						<font style="font-size: 12px;">性别:</font>
						<span class="radioSpan"  >
			                <input type="radio" name="USex" value="1" >男</input>
			                <input type="radio" name="USex" value="0" >女</input>
			            </span>
					</div>
					<div>
						<font style="font-size: 12px;">帐号:</font><br />
						<input name="UAccount" id="UAccount" maxlength="30" class="easyui-textbox"
							data-options="required:true,
							onChange: existAccount" style="width:300px;"><br>
					</div>
					<div>
						<font style="font-size: 12px;">密码:</font><br />
						<!-- data-options="required:true" -->
						<input name="UPwd" id="UPwd" type="password" maxlength="18" class="easyui-textbox"
							 style="width:300px;"><br>
					</div>
					<div>
						<font style="font-size: 12px;">确认密码:</font><br />
						<input name="UPwdAgin" id="UPwdAgin" type="password" maxlength="18" class="easyui-textbox"
							 style="width:300px;"><br>
					</div>
					<div>
						<font style="font-size: 12px;">所属单位:</font><br />
						<input name="UGroup" id="UGroup" class="easyui-combotree"
							data-options="panelHeight:400,loadFilter:convertTreeAppendRoot,required:true,lines:false"
							style="width:300px;"><br>
					</div>
					<div>
						<font style="font-size: 12px;">手机号码:</font><br />
						<input name="UMobile" id="UMobile" maxlength="20" class="easyui-textbox"
							data-options="validType: 'mobile'" style="width:300px;"><br>
					</div>
					<div>
						<font style="font-size: 12px;">电子邮箱:</font><br />
						<input name="UMail" id="UMail" maxlength="50" class="easyui-textbox"
							data-options="validType: 'email'" style="width:300px;"><br>
					</div>
					<div>
						<font style="font-size: 12px;">角色:</font><br />
						<input name="URoles" id="URoles" class="easyui-combotree" style="width:300px;"
								data-options="
									url: 'role/role_native_tree.tree',
									multiple:true,
									editable: false,
									valueField: 'id',
									textField: 'text',
									cascadeCheck:false"/>
									<!-- ,
									loadFilter:convertTreeAppendRoot -->
							<br>
					</div>
					<div>
						<font style="font-size: 12px;">备注:</font><br />
						<input name="URemarks" id="URemarks" data-options="multiline:true" maxlength="200"
							class="easyui-textbox" style="width:300px;height:50px"><br>
					</div>
					<p>新增用户时密码为空，初始密码为123456</p>
				</form>
			</div>
			<div id="dlg-buttons">
				<a href="javascript:void(0);" class="easyui-linkbutton" onclick="module.edit()">保存</a>
				<a href="javascript:void(0);" class="easyui-linkbutton" onclick="module.closeDialog()">取消</a>
			</div>
			<!-- 角色绑定 -->
		<!-- <div id="rolebind_dialog" class="easyui-dialog" title="角色绑定" style="width:760px;height:500px;" 	data-options="iconCls:'icon-vcardedit',resizable:true,modal:true,buttons:'#role_dialog-buttons'">   
		    <div class="easyui-layout" data-options="fit:true">   
			    <div data-options="region:'east',iconCls:'icon-reload'" style="width:300px;">
			    	<table class="easyui-datagrid"  id="choose_rolegrid">
						<thead>
							<tr>
								<th data-options="field:'id',width:50,checkbox:true">ID</th>
								<th data-options="field:'r_name',width:200">角色名称</th>
							</tr>
						</thead>
					</table>
			    </div>   
			    <div data-options="region:'west'" style="width:370px;">
			    	<table class="easyui-datagrid" title="" id="rolegrid"
				  		 data-options="
				  		 	url: 'user/roleList.grid',
				  		 	method: 'get',
				  		 	rownumbers: true,
				  		 	fit: true,
				  		 	toolbar:'#role_grid_tb'
				  		 ">
						<thead>
							<tr>
								<th data-options="field:'id',width:50,checkbox:true">ID</th>
								<th data-options="field:'r_name',width:100">角色名称</th>
								<th data-options="field:'r_remarks',width:100,
									formatter:function(value, row, index) {
										return Common.Util.formatter(value);
									}">备注</th>
							</tr>
						</thead>
					</table>
					toolbar
					<div id="role_grid_tb" style="padding:5px;height:auto">
						角色名称: <input id="rolename" class="easyui-textbox" data-options="prompt:'输入关键字进行查询'" style="width:140px;">
						<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-search" onclick="module.queryDatagrid();">查询</a>
						<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-reload" onclick="module.refreshDatagrid();">刷新</a>
					</div>
			    </div>   
			    <div data-options="region:'center'" style="padding:5px;background:#eee;">
			    	<div style="position: absolute;top: 200px;">
			    		<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-add" onclick="addChooseRole();">添加</a>
			    		<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-cancel" onclick="addChooseRole();">删除</a>
			    	</div>
			    </div>   
			</div>  
    	</div>
    	<div id="role_dialog-buttons">
				<a href="javascript:void(0);" class="easyui-linkbutton" onclick="module.edit()">保存</a>
				<a href="javascript:void(0);" class="easyui-linkbutton" onclick="module.closeDialog()">取消</a>
			</div> -->
		<!--end role_bind_dialog-->
		</div>
	</body>
</html>
</#compress>